package com.tuo51.evaluate.service;

import com.tuo51.evaluate.domain.evaluatingV2.EvaluateV2Record;

import java.util.Map;

public interface EvaluateV2ConclusionService {

    enum ReportRatings {
        // data:['偏低(69分以下)','落后(70-84分)','正常(85-114分)','优秀(115-129分)','超常(130分以上)','本次测评'],
        REPORT_RATING_APP (0,"A++", "超常"),
        REPORT_RATING_AP(1,"A+", "优秀"),
        REPORT_RATING_A(2, "A", "正常"),
        REPORT_RATING_B (3,"B", "落后"),
        REPORT_RATING_BM (4, "B-", "偏低");


        public static ReportRatings forRating(String rating) {
            switch (rating) {
                case "A++": return REPORT_RATING_APP;
                case "A+": return REPORT_RATING_AP;
                case "A": return REPORT_RATING_A;
                case "B": return REPORT_RATING_B;
                case "B-": return REPORT_RATING_BM;
                default: return REPORT_RATING_A;
            }
        }

        private int value ;
        private String desc;
        private String rating;

        private ReportRatings(int value, String rating, String desc){
            this.value = value;
            this.desc = desc;
            this.rating = rating;
        }

        public int getValue() {
            return this.value;
        }
        public String getRating(){return this.rating;}
        public String getDesc(){return this.desc;}
    }

    //警示结论
    String getWarningConclusion(EvaluateV2Record record);

    //正常结论
    String getNormalConclusion(EvaluateV2Record record);

    //报告比较结论
    String getDQComparingConclusion(EvaluateV2Record record, EvaluateV2Record comparingRecord);

    String getHeightComparingConclusion(EvaluateV2Record record, EvaluateV2Record comparingRecord);

    String getWeightComparingConclusion(EvaluateV2Record record, EvaluateV2Record comparingRecord);

    //获取报告dq
    int reportDQ(EvaluateV2Record record);

    //分数评级
    String dqRating(int dq);

    //报告评级
    String reportRating(EvaluateV2Record record);

    //获取报告扩展资料
    Map generateReportExtInfo(EvaluateV2Record record);

    //当前月龄总体发育信息
    String getMonthConclusion(int month);
}
